﻿Imports System.ComponentModel
Public Class ExpenseTypeClass
    Implements INotifyPropertyChanged

    Sub New()
        ' TODO: Complete member initialization 
    End Sub

    Public Event PropertyChanged( _
      ByVal sender As Object, _
      ByVal e As PropertyChangedEventArgs) _
      Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged

    Protected Overridable Sub OnPropertyChanged(ByVal PropertyName As String)
        ' Raise the event, and make this procedure
        ' overridable, should someone want to inherit from
        ' this class and override this behavior:
        RaiseEvent PropertyChanged( _
          Me, New PropertyChangedEventArgs(PropertyName))
    End Sub

    Public Sub New(ByVal ExpenseTypeId As Integer, ByVal ExpenseName As String, ByVal ExpenseOneOff As Boolean)
        ' Set the backing field so that
        ' you don't raise the PropertyChanged event
        ' when you first create the Customer.
        _ExpenseName = ExpenseName
        _ExpenseTypeID = ExpenseTypeId
        _ExpenseOneOff = ExpenseOneOff

    End Sub

    Private _ExpenseName As String
    Private _ExpenseTypeID As Integer
    Private _ExpenseOneOff As Boolean
    Private _ExpenseComment As String
    Public Property ExpenseName() As String
        Get
            Return _ExpenseName
        End Get
        Set(ByVal value As String)
            If _ExpenseName <> value Then
                _ExpenseName = value
                OnPropertyChanged("ExpenseName")
            End If
        End Set
    End Property

    Public Property ExpenseTypeId() As Integer
        Get
            Return _ExpenseTypeID
        End Get
        Set(ByVal value As Integer)
            If _ExpenseTypeID <> value Then
                _ExpenseTypeID = value
                OnPropertyChanged("ExpenseTypeId")
            End If
        End Set
    End Property

    Public Property ExpenseOneOff() As Boolean
        Get
            Return _ExpenseOneOff
        End Get
        Set(ByVal value As Boolean)
            If _ExpenseOneOff <> value Then
                _ExpenseOneOff = value
                OnPropertyChanged("ExpenseOneOff")
            End If
        End Set
    End Property

    Public Property ExpenseComment() As String
        Get
            Return _ExpenseComment
        End Get
        Set(ByVal value As String)
            If _ExpenseComment <> value Then
                _ExpenseComment = value
                OnPropertyChanged("ExpenseComment")
            End If
        End Set
    End Property
End Class
